package com.zone.gateway.center.interfaces;

import com.zone.gateway.center.application.IRegisterManageService;
import com.zone.gateway.center.domain.register.model.entity.ApplicationInterfaceEntity;
import com.zone.gateway.center.domain.register.model.entity.ApplicationInterfaceMethodEntity;
import com.zone.gateway.center.domain.register.model.entity.ApplicationSystemEntity;
import com.zone.gateway.common.response.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author: zongzi
 * @description: TODO
 * @date: 2025/4/24
 */
@RestController
@RequestMapping("/application/manage")
public class ApplicationConfigManageController {
    @Autowired
    private IRegisterManageService registerManageService;


    @PostMapping("/regis_application_system")
    public Result<Boolean> regisApplicationSystem(@RequestBody ApplicationSystemEntity request) {
        registerManageService.regisApplicationSystem(request);
        return Result.success(true);
    }

    @PostMapping("/regis_application_interface")
    public Result<Boolean> regisApplicationSystem(@RequestBody ApplicationInterfaceEntity request) {
        registerManageService.regisApplicationInterface(request);
        return Result.success(true);
    }

    @PostMapping("/regis_application_interface_method")
    public Result<Boolean> regisApplicationSystem(@RequestBody ApplicationInterfaceMethodEntity request) {
        registerManageService.regisApplicationInterfaceMethod(request);
        return Result.success(true);
    }

}
